package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.BsUserContract;
import com.ruoyi.system.service.BsUserContractService;
import com.ruoyi.system.mapper.BsUserContractMapper;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class BsUserContractServiceImpl extends ServiceImpl<BsUserContractMapper, BsUserContract>
    implements BsUserContractService{

    @Override
    public boolean checkUserExist(String contractCard, Long userId) {
        int count = count(new LambdaQueryWrapper<BsUserContract>().eq(BsUserContract::getUserId,userId).eq(BsUserContract::getContractCard,contractCard));
        return count > 0;
    }
}




